package org.itstack.demo.design;

import java.util.Date;

/**
 * @Author: fanYuLe
 * @CreateTime: 2023-12-28  13:49
 * @Description: 业务接⼝实现类
 * 现在再看业务流程的实现中可以看到已经⾮常简单了，没有额外的辅助流程，只有核⼼流程的处
 * 理。
 */
public class LotteryServiceImpl extends LotteryService{
    private MinibusTargetService minibusTargetService = new MinibusTargetService();
    @Override
    protected LotteryResult doDraw(String uId) {
        //摇号
        String lottery = minibusTargetService.lottery(uId);
        //结果
        return new LotteryResult(uId,lottery,new Date());
    }
}
